#ifndef PRINTSHADERINFOLOG
#define PRINTSHADERINFOLOG

#include <OpenGL/OpenGL.h>
#include <OpenGL/glu.h>
#include <stdlib.h>
#include <stdio.h>

void printShaderInfoLog(GLuint obj, char* NAME)
	{
		printf("In shader %s,\n", NAME); 
	    int infologLength = 0;
	    int charsWritten  = 0;
	    char *infoLog;
	    glGetShaderiv(obj, GL_INFO_LOG_LENGTH,&infologLength);
	    if (infologLength > 0)
	    {
	        infoLog = (char *)malloc(infologLength);
	        glGetShaderInfoLog(obj, infologLength, &charsWritten, infoLog);
		printf("printShaderInfoLog: %s\n",infoLog);
	        free(infoLog);
	    }else{
		printf("Shader Info Log: OK\n");
	    }
	}

#endif
